using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using Prism.DryIoc;
using Prism.Ioc;
using RoboAssembleX.Application;
using RoboAssembleX.Views;

namespace RoboAssembleX
{
    public partial class App : PrismApplication
    {
        protected override AvaloniaObject CreateShell()
        {
            return Container.Resolve<WinMain>();
        }

        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<ViewTop>("ViewTop");
            containerRegistry.RegisterForNavigation<ViewMain>("ViewMain");

            containerRegistry.RegisterForNavigation<ViewRoboControl>("ViewRoboControl");
            containerRegistry.RegisterForNavigation<ViewAddGlass1Control>("ViewAddGlass1Control");
            containerRegistry.RegisterForNavigation<ViewAddBoard1Control>("ViewAddBoard1Control");
            containerRegistry.RegisterForNavigation<ViewAddBoard2Control>("ViewAddBoard2Control");
            containerRegistry.RegisterForNavigation<ViewAddNeedle1Control>("ViewAddNeedle1Control");
            containerRegistry.RegisterForNavigation<ViewAddNeedle2Control>("ViewAddNeedle2Control");
            containerRegistry.RegisterForNavigation<ViewMessageShow>("ViewMessageShow");
            containerRegistry.RegisterForNavigation<ViewAutoRunControl>("ViewAutoRunControl");

            containerRegistry.RegisterApplicationTypes();
        }
    }
}